package com.platform.car.service;

import com.platform.car.model.Cars;
import com.platform.common.base.service.BaseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


public interface CarsService extends BaseService<Cars> {

    /**
     * 统计用户绑定的车辆
     * @param cars
     * @return
     */
    Long countNumber(Cars cars);

    /**
     * 查看用户是否已经绑定过该车牌号
     * @param cars
     * @return
     */
    Long countNumberPlates(Cars cars);

    /**
     * 查询用户绑定的车辆
     * @param cars
     * @return
     */
    List<Cars> selectByUserId(Cars cars);

    /**
     * 根据用户和车牌号查询
     * @param cars
     * @return
     */
    Cars selectByPlates(Cars cars);

    /**
     * 根据用户的ID删除
     * @param userId
     */
    Integer deleteByUserId(Integer userId);
}
